export interface ResponseData {
  code: number
  ok: boolean
  message: string
}

export interface HospitalDetail {
  bookingRule: {
    cycle: number
    releaseTime: string
    stopTime: string
    quitDay: number
    quitTime: string
    rule: Array<string>
  }
  hospital: {
    id: string
    createTime: string
    updateTime: string
    isDeleted: number
    param: {
      hostypeString: string
      fullAddress: string
    }
    hoscode: string
    hosname: string
    hostype: string
    provinceCode: string
    cityCode: string
    districtCode: string
    address: string
    logoData: string
    intro: string
    route: string
    status: number
    bookingRule: null
  }
}

export interface HospitalDetailResponse extends ResponseData {
  data: HospitalDetail
}

// 医院科室
export interface Department {
  depcode: string
  depname: string
  children?: Array<Department>
}

export interface HospitalDepartmentResponse extends ResponseData {
  data: Department[]
}

// bookingSchedule
export interface BookingSchedule {
  workDate: string
  workDateMd: string
  dayOfWeek: string
  docCount: number
  reservedNumber: number
  availableNumber: number
  status: number
}

export type BookingScheduleList = Array<BookingSchedule>
export interface HospitalScheduleBaseMap {
  bigname: string
  depname: string
  hosname: string
  releaseTime: string
  stopTime: string
  workDateString: string
}
export interface HospitalScheduleResponse extends ResponseData {
  data: {
    baseMap: HospitalScheduleBaseMap
    bookingScheduleList: BookingScheduleList
    total: number
  }
}

export interface SearchParams {
  hoscode: string
  depcode: string
  page: number
  limit: number
}

export interface ScheduleDetail {
  amount: number
  availableNumber: number
  createTime: string
  depcode: string
  docname: string
  hosScheduleId: string
  hoscode: string
  id: string
  isDeleted: number
  param: { dayOfWeek: string; depname: string; hosname: '北京人民医院' }
  reservedNumber: number
  skill: string
  status: number
  title: string
  updateTime: string
  workDate: string
  workTime: number
}

export type ScheduleList = Array<ScheduleDetail>

export interface ScheduleDetailResponse extends ResponseData {
  data: ScheduleList
}

export interface ScheduleIdDetail {
  id: string
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    dayOfWeek: string
    depname: string
    hosname: string
  }
  hoscode: string
  depcode: string
  title: string
  docname: string
  skill: string
  workDate: string
  workTime: number
  reservedNumber: number
  availableNumber: number
  amount: number
  status: number
  hosScheduleId: string
}

export interface ScheduleIdDetailResponse {
  data: ScheduleIdDetail
}
